<?php
include '../pkj/all.php';

function upload() {
    $arquivo = new UploadParser("arquivo");
    $arquivo->save();
    append("<a href='" . $arquivo->getName() . "'>" . ucase($arquivo->getName()) . "</a><br>");
    popup("Arquivo salvo");
}
?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <?php
        import("all");
        ?>
    </head>
    <body>
        <form>
            <?php
            echo div(label("Arquivo"), 1);
            echo div(file_form("arquivo"), 2);
            echo div(label("Nome"), 1);
            echo div(text("Nome"), 3);
            echo div(button("", "OK", "click=upload()"), 5);
            ?>
            <div id="saida"></div>
        </form>
    </body>
</html>
